package org.opens.lambda.date;

import org.junit.Test;

import java.util.Calendar;
import java.util.Date;

public class CalendarAndDate {

    @Test
    public void test1() {
        Date date = new Date();
        Calendar calendar = Calendar.getInstance();

        calendar.setTime(date);
        System.out.println(calendar.get(Calendar.YEAR));
    }

}
